﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace Miao.Stand
{
    public class Projectile_SheeHeartAttack: Projectile_Explosive
    {
        protected override void Explode()
        {
            //base.Explode();
            Map map = base.Map;
            //创建枯萎穿心攻击
            Pawn sheeHeartAttack = PawnGenerator.GeneratePawn(StandPawnKindDefOf.SheeHeartAttack, launcher.Faction);
            var killerQueen = launcher as KillerQueenStand;
            killerQueen.SheeHeartAttack = GenSpawn.Spawn(sheeHeartAttack, this.PositionHeld, this.Map) as Pawn;
            SheeHeartAttackCompToken compToken = killerQueen.SheeHeartAttack.GetComp<SheeHeartAttackCompToken>();
            compToken.explosionRadius = this.def.projectile.explosionRadius;
            compToken.owner = killerQueen;
            Destroy();
        }
    }
}
